package com.restaurant.application.service.feigh;

import feign.QueryMap;
import feign.RequestLine;
import lombok.Data;

import java.util.List;
import java.util.Map;

public interface IGateway2dfire {

    @RequestLine("POST /")
    public Map<String, Object> query1(@QueryMap Map<String, Object> param);


    @RequestLine("POST /")
    public TResponse queryOrders(@QueryMap Map<String, Object> param);

    @RequestLine("POST /")
    public TOrderDetailResponse queryOrderDetail(@QueryMap Map<String, Object> param);

    @Data
    static class TResponse {
        private Integer code;
        private TDataL1 data;
        private Integer record;

        public Integer getCode() {
            return code;
        }

        public void setCode(Integer code) {
            this.code = code;
        }

        public TDataL1 getData() {
            return data;
        }

        public void setData(TDataL1 data) {
            this.data = data;
        }

        public Integer getRecord() {
            return record;
        }

        public void setRecord(Integer record) {
            this.record = record;
        }
    }

    @Data
    static class TDataL1 {

        List<ShopOrderVo> data;

        public List<ShopOrderVo> getData() {
            return data;
        }

        public void setData(List<ShopOrderVo> data) {
            this.data = data;
        }
    }

    @Data
    static class TOrderDetailResponse {
        private Integer code;
        private TDataL3 data;
        private Integer record;

        public Integer getCode() {
            return code;
        }

        public void setCode(Integer code) {
            this.code = code;
        }

        public TDataL3 getData() {
            return data;
        }

        public void setData(TDataL3 data) {
            this.data = data;
        }

        public Integer getRecord() {
            return record;
        }

        public void setRecord(Integer record) {
            this.record = record;
        }
    }

    @Data
    static class TDataL2 {

        TDataL3 data;

        public TDataL3 getData() {
            return data;
        }

        public void setData(TDataL3 data) {
            this.data = data;
        }
    }

    @Data
    static class TDataL3 {

        List<InstanceVo> data;

        public List<InstanceVo> getData() {
            return data;
        }

        public void setData(List<InstanceVo> data) {
            this.data = data;
        }
    }


    @Data
    static class TDataL4 {

        List<ShopOrderVo> data;

        public List<ShopOrderVo> getData() {
            return data;
        }

        public void setData(List<ShopOrderVo> data) {
            this.data = data;
        }
    }


    @Data
    static class ShopOrderVo {


        OrderVo orderVo;// 订单信息


        TotalPayVo totalPayVo;//实际支付信息


        List<PayVo> payVoList;//支付信息列表


        ServiceBillVo serviceBillVo;//账单信息

        public OrderVo getOrderVo() {
            return orderVo;
        }

        public void setOrderVo(OrderVo orderVo) {
            this.orderVo = orderVo;
        }

        public TotalPayVo getTotalPayVo() {
            return totalPayVo;
        }

        public void setTotalPayVo(TotalPayVo totalPayVo) {
            this.totalPayVo = totalPayVo;
        }

        public List<PayVo> getPayVoList() {
            return payVoList;
        }

        public void setPayVoList(List<PayVo> payVoList) {
            this.payVoList = payVoList;
        }

        public ServiceBillVo getServiceBillVo() {
            return serviceBillVo;
        }

        public void setServiceBillVo(ServiceBillVo serviceBillVo) {
            this.serviceBillVo = serviceBillVo;
        }
    }

    @Data
    static class OrderVo {

        private String orderId;
        private String innerCode;
        private String entityId;
        private Long openTime;//开单时间
        private String seatName;

        private String seatCode;
        private Integer peopleCount;
        private Integer code;
        private String simpleCode;//全局单号

        private Long endTime;//结单时间
        private Short orderFrom;//单据来源

        private Short orderType;//订单类型

        String planName;//附加费方案

        Double planFee;//附加费

        String areaName;//区域

        String customerId;//下单会员Id
        Integer status;//1正常状态 2并单状态 3撤消状态 4结账状态 5超时状态

        public String getOrderId() {
            return orderId;
        }

        public void setOrderId(String orderId) {
            this.orderId = orderId;
        }

        public String getInnerCode() {
            return innerCode;
        }

        public void setInnerCode(String innerCode) {
            this.innerCode = innerCode;
        }

        public String getEntityId() {
            return entityId;
        }

        public void setEntityId(String entityId) {
            this.entityId = entityId;
        }

        public Long getOpenTime() {
            return openTime;
        }

        public void setOpenTime(Long openTime) {
            this.openTime = openTime;
        }

        public String getSeatName() {
            return seatName;
        }

        public void setSeatName(String seatName) {
            this.seatName = seatName;
        }

        public String getSeatCode() {
            return seatCode;
        }

        public void setSeatCode(String seatCode) {
            this.seatCode = seatCode;
        }

        public Integer getPeopleCount() {
            return peopleCount;
        }

        public void setPeopleCount(Integer peopleCount) {
            this.peopleCount = peopleCount;
        }

        public Integer getCode() {
            return code;
        }

        public void setCode(Integer code) {
            this.code = code;
        }

        public String getSimpleCode() {
            return simpleCode;
        }

        public void setSimpleCode(String simpleCode) {
            this.simpleCode = simpleCode;
        }

        public Long getEndTime() {
            return endTime;
        }

        public void setEndTime(Long endTime) {
            this.endTime = endTime;
        }

        public Short getOrderFrom() {
            return orderFrom;
        }

        public void setOrderFrom(Short orderFrom) {
            this.orderFrom = orderFrom;
        }

        public Short getOrderType() {
            return orderType;
        }

        public void setOrderType(Short orderType) {
            this.orderType = orderType;
        }

        public String getPlanName() {
            return planName;
        }

        public void setPlanName(String planName) {
            this.planName = planName;
        }

        public Double getPlanFee() {
            return planFee;
        }

        public void setPlanFee(Double planFee) {
            this.planFee = planFee;
        }

        public String getAreaName() {
            return areaName;
        }

        public void setAreaName(String areaName) {
            this.areaName = areaName;
        }

        public String getCustomerId() {
            return customerId;
        }

        public void setCustomerId(String customerId) {
            this.customerId = customerId;
        }

        public Integer getStatus() {
            return status;
        }

        public void setStatus(Integer status) {
            this.status = status;
        }
    }

    @Data
    static class TotalPayVo {


        Long currDate;//发生日期

        Double sourceAmount;//原始费用

        Double discountAmount;//折后费用

        Double resultAmount;//应付总额

        Double receiveAmount;//实收总额


        Double outFee;//外送费


        Long operateDate;//结账时间


        Double invoice;//开发票额


        Double couponDiscount;//券优惠金额


        public Long getCurrDate() {
            return currDate;
        }

        public void setCurrDate(Long currDate) {
            this.currDate = currDate;
        }

        public Double getSourceAmount() {
            return sourceAmount;
        }

        public void setSourceAmount(Double sourceAmount) {
            this.sourceAmount = sourceAmount;
        }

        public Double getDiscountAmount() {
            return discountAmount;
        }

        public void setDiscountAmount(Double discountAmount) {
            this.discountAmount = discountAmount;
        }

        public Double getResultAmount() {
            return resultAmount;
        }

        public void setResultAmount(Double resultAmount) {
            this.resultAmount = resultAmount;
        }

        public Double getReceiveAmount() {
            return receiveAmount;
        }

        public void setReceiveAmount(Double receiveAmount) {
            this.receiveAmount = receiveAmount;
        }

        public Double getOutFee() {
            return outFee;
        }

        public void setOutFee(Double outFee) {
            this.outFee = outFee;
        }

        public Long getOperateDate() {
            return operateDate;
        }

        public void setOperateDate(Long operateDate) {
            this.operateDate = operateDate;
        }

        public Double getInvoice() {
            return invoice;
        }

        public void setInvoice(Double invoice) {
            this.invoice = invoice;
        }

        public Double getCouponDiscount() {
            return couponDiscount;
        }

        public void setCouponDiscount(Double couponDiscount) {
            this.couponDiscount = couponDiscount;
        }
    }

    @Data
    static class PayVo {


        String entityId; //店铺Id


        String kindPayName;//付款方式


        Double fee;//实收额


        String operator;//收银员


        Long payTime;//收银时间


        Double pay;//现收金额


        Double charge;//找零


        public String getEntityId() {
            return entityId;
        }

        public void setEntityId(String entityId) {
            this.entityId = entityId;
        }

        public String getKindPayName() {
            return kindPayName;
        }

        public void setKindPayName(String kindPayName) {
            this.kindPayName = kindPayName;
        }

        public Double getFee() {
            return fee;
        }

        public void setFee(Double fee) {
            this.fee = fee;
        }

        public String getOperator() {
            return operator;
        }

        public void setOperator(String operator) {
            this.operator = operator;
        }

        public Long getPayTime() {
            return payTime;
        }

        public void setPayTime(Long payTime) {
            this.payTime = payTime;
        }

        public Double getPay() {
            return pay;
        }

        public void setPay(Double pay) {
            this.pay = pay;
        }

        public Double getCharge() {
            return charge;
        }

        public void setCharge(Double charge) {
            this.charge = charge;
        }
    }

    @Data
    static class ServiceBillVo {


        String entityId;//店铺Id


        Double originAmount;//原始消费金额


        Double originServiceCharge;//原始服务费金额


        Double originLeastAmount;//原始最低消费


        Double agioAmount;//折后消费金额


        Double agioServiceCharge;//折后服务费


        Double agioLeastAmount;// 折后最低消费


        Double originReceivablesAmount;//原始应收金额


        Double agioReceivablesAmount;//折后应收金额


        Double finalAmount;//最终应收金额


        Double originTotal;//原始总金额


        Double agioTotal; //折后总金额


        Double reserveAmount;//预付金额


        Double outFee;//外送费


        Double notIncludeAmount;//不计营业额总额

        public String getEntityId() {
            return entityId;
        }

        public void setEntityId(String entityId) {
            this.entityId = entityId;
        }

        public Double getOriginAmount() {
            return originAmount;
        }

        public void setOriginAmount(Double originAmount) {
            this.originAmount = originAmount;
        }

        public Double getOriginServiceCharge() {
            return originServiceCharge;
        }

        public void setOriginServiceCharge(Double originServiceCharge) {
            this.originServiceCharge = originServiceCharge;
        }

        public Double getOriginLeastAmount() {
            return originLeastAmount;
        }

        public void setOriginLeastAmount(Double originLeastAmount) {
            this.originLeastAmount = originLeastAmount;
        }

        public Double getAgioAmount() {
            return agioAmount;
        }

        public void setAgioAmount(Double agioAmount) {
            this.agioAmount = agioAmount;
        }

        public Double getAgioServiceCharge() {
            return agioServiceCharge;
        }

        public void setAgioServiceCharge(Double agioServiceCharge) {
            this.agioServiceCharge = agioServiceCharge;
        }

        public Double getAgioLeastAmount() {
            return agioLeastAmount;
        }

        public void setAgioLeastAmount(Double agioLeastAmount) {
            this.agioLeastAmount = agioLeastAmount;
        }

        public Double getOriginReceivablesAmount() {
            return originReceivablesAmount;
        }

        public void setOriginReceivablesAmount(Double originReceivablesAmount) {
            this.originReceivablesAmount = originReceivablesAmount;
        }

        public Double getAgioReceivablesAmount() {
            return agioReceivablesAmount;
        }

        public void setAgioReceivablesAmount(Double agioReceivablesAmount) {
            this.agioReceivablesAmount = agioReceivablesAmount;
        }

        public Double getFinalAmount() {
            return finalAmount;
        }

        public void setFinalAmount(Double finalAmount) {
            this.finalAmount = finalAmount;
        }

        public Double getOriginTotal() {
            return originTotal;
        }

        public void setOriginTotal(Double originTotal) {
            this.originTotal = originTotal;
        }

        public Double getAgioTotal() {
            return agioTotal;
        }

        public void setAgioTotal(Double agioTotal) {
            this.agioTotal = agioTotal;
        }

        public Double getReserveAmount() {
            return reserveAmount;
        }

        public void setReserveAmount(Double reserveAmount) {
            this.reserveAmount = reserveAmount;
        }

        public Double getOutFee() {
            return outFee;
        }

        public void setOutFee(Double outFee) {
            this.outFee = outFee;
        }

        public Double getNotIncludeAmount() {
            return notIncludeAmount;
        }

        public void setNotIncludeAmount(Double notIncludeAmount) {
            this.notIncludeAmount = notIncludeAmount;
        }
    }

    @Data
    static class InstanceVo {


        String entityId;//店铺id


        String orderId;//订单id


        Short kind;//点菜类型


        String name;//菜名


        String menuCode;//商品编码


        String makeId;//做法id


        String makeName;//做法


        String specItemId;//规格id


        Double accountNum;//结账数量


        Double price;//价格


        Double ratio;//折扣率


        Double fee;//金额


        Double ratioFee;//折后金额


        String specDetailName;//规格名


        String accountUnit;//结账单位


        Double isMemberPrice;//是否使用会员价(1.00表示使用会员价，0.00表示不使用)


        String kindMenuName;//菜类名


        String rootKindMenuName;//根菜类名


        boolean giveDish;//是否赠菜


        boolean canceled;//是否取消（true：取消 false：没有取消）


        String memo;//备注（退菜/赠菜理由）


        String opUserName;//操作人姓名（退菜/赠菜操作人）


        Double num;//点菜数量


        public String getEntityId() {
            return entityId;
        }

        public void setEntityId(String entityId) {
            this.entityId = entityId;
        }

        public String getOrderId() {
            return orderId;
        }

        public void setOrderId(String orderId) {
            this.orderId = orderId;
        }

        public Short getKind() {
            return kind;
        }

        public void setKind(Short kind) {
            this.kind = kind;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getMenuCode() {
            return menuCode;
        }

        public void setMenuCode(String menuCode) {
            this.menuCode = menuCode;
        }

        public String getMakeId() {
            return makeId;
        }

        public void setMakeId(String makeId) {
            this.makeId = makeId;
        }

        public String getMakeName() {
            return makeName;
        }

        public void setMakeName(String makeName) {
            this.makeName = makeName;
        }

        public String getSpecItemId() {
            return specItemId;
        }

        public void setSpecItemId(String specItemId) {
            this.specItemId = specItemId;
        }

        public Double getAccountNum() {
            return accountNum;
        }

        public void setAccountNum(Double accountNum) {
            this.accountNum = accountNum;
        }

        public Double getPrice() {
            return price;
        }

        public void setPrice(Double price) {
            this.price = price;
        }

        public Double getRatio() {
            return ratio;
        }

        public void setRatio(Double ratio) {
            this.ratio = ratio;
        }

        public Double getFee() {
            return fee;
        }

        public void setFee(Double fee) {
            this.fee = fee;
        }

        public Double getRatioFee() {
            return ratioFee;
        }

        public void setRatioFee(Double ratioFee) {
            this.ratioFee = ratioFee;
        }

        public String getSpecDetailName() {
            return specDetailName;
        }

        public void setSpecDetailName(String specDetailName) {
            this.specDetailName = specDetailName;
        }

        public String getAccountUnit() {
            return accountUnit;
        }

        public void setAccountUnit(String accountUnit) {
            this.accountUnit = accountUnit;
        }

        public Double getIsMemberPrice() {
            return isMemberPrice;
        }

        public void setIsMemberPrice(Double isMemberPrice) {
            this.isMemberPrice = isMemberPrice;
        }

        public String getKindMenuName() {
            return kindMenuName;
        }

        public void setKindMenuName(String kindMenuName) {
            this.kindMenuName = kindMenuName;
        }

        public String getRootKindMenuName() {
            return rootKindMenuName;
        }

        public void setRootKindMenuName(String rootKindMenuName) {
            this.rootKindMenuName = rootKindMenuName;
        }

        public boolean isGiveDish() {
            return giveDish;
        }

        public void setGiveDish(boolean giveDish) {
            this.giveDish = giveDish;
        }

        public boolean isCanceled() {
            return canceled;
        }

        public void setCanceled(boolean canceled) {
            this.canceled = canceled;
        }

        public String getMemo() {
            return memo;
        }

        public void setMemo(String memo) {
            this.memo = memo;
        }

        public String getOpUserName() {
            return opUserName;
        }

        public void setOpUserName(String opUserName) {
            this.opUserName = opUserName;
        }

        public Double getNum() {
            return num;
        }

        public void setNum(Double num) {
            this.num = num;
        }
    }

}
